package com.oracle.feign;

import com.oracle.application.vo.R;
import com.oracle.failback.FailBackVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;


import javax.servlet.http.HttpServletRequest;

@FeignClient(value = "bookstore-cart-server",path = "/cart",fallbackFactory = FailBackVo.class)
public interface CartFeign {

        @PostMapping("/addCart")
        public R addCart(@RequestParam(value = "bookId") Integer bookId, @RequestParam(value = "buyNum") Integer buyNum,@RequestParam("token") String token);

        @GetMapping("/delCart")
        public R delCart(@RequestParam(value = "bookId") Integer bookId);

}
